package org.example.portrait.module.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.HashMap;
import java.util.Map;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserProfile {
    private Integer userId;                          // 用户ID
    private Long totalClicks;                        // 总点击数
    private Long totalPurchases;                     // 总购买数
    private Long totalShare;                         // 总分享数
    private Map<String, Long> categoryPreferences;   // 分类偏好
    private Long lastActiveTime;                     // 最后活跃时间

    // 初始化方法
    public UserProfile(Integer userId) {
        this.userId = userId;
        this.totalClicks = 0L;
        this.totalPurchases = 0L;
        this.totalShare = 0L;
        this.categoryPreferences = new HashMap<>();
        this.lastActiveTime = 0L;
    }
}
